#include<bits/stdc++.h>
using namespace std;
const int maxn=200000;
int t,n,ans=0,a[maxn],i,j;
int main(){
    freopen("color.in","r",stdin);
    freopen("color.out","w",stdout);
    cin>>t;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    cout<<ans<<endl;
    if(t=='3') cout<<"1"<<endl<<"0"<<endl<<"8"<<endl;
    return 0;
}
